import React,{Component} from 'react';

class CreateVcs extends Component{
  constructor(props){
    super(props);
    this.state={
      inputName:''
    }
    this.handleClick = this.handleClick.bind(this);
    this.handleChange = this.handleChange.bind(this)
  }
  render(){
    return(
      <div>
        <input value={this.state.inputName} onChange ={this.handleChange}/>
        <button onClick={this.handleClick}>创建应急调度</button>
      </div>
    )
  }
  handleChange(e){
    const value = e.target.value;
    this.setState(()=> ({
        inputName: value
    }))   
}
  handleClick(){
    console.log(this.state.inputName)
  }
}

export default CreateVcs;